namespace GeneXus.Programs {
   using System;
   using System.Collections;
   using GeneXus.Utils;
   using GeneXus.Resources;
   using GeneXus.Application;
   using GeneXus.Metadata;
   using com.genexus;
   using com.genexus.ui;
   using com.genexus.uifactory;
   using GeneXus.Windows;
   using System.Data;
   using System.Data.SqlClient;
   using GeneXus.Data;
   using GeneXus.Data.FAT;
   using GeneXus.XML;
   using GeneXus.Encryption;
   using GeneXus.Http.Client;
   public class subwmntprsn16 : GXSubfileElement
   {
      private short VSel ;
      private String PrsCod ;
      private String TipDocNom ;
      private String PrsNroDoc ;
      private String PrsApePat ;
      private String PrsApeMat ;
      private String PrsPriNom ;
      private String PrsSegNom ;
      private short TIPDOCCOD ;
      private short TipPrsCod ;
      private String PrsEst ;
      private DateTime PrsFCR ;
      private String PrsHCR ;
      private String PrsUCR ;
      private DateTime PrsFUM ;
      private String PrsHUM ;
      private String PrsUUM ;
      public short getVSel( )
      {
         return VSel ;
      }

      public void setVSel( short value )
      {
         VSel = value;
      }

      public String getPrsCod( )
      {
         return PrsCod ;
      }

      public void setPrsCod( String value )
      {
         PrsCod = value;
      }

      public String getTipDocNom( )
      {
         return TipDocNom ;
      }

      public void setTipDocNom( String value )
      {
         TipDocNom = value;
      }

      public String getPrsNroDoc( )
      {
         return PrsNroDoc ;
      }

      public void setPrsNroDoc( String value )
      {
         PrsNroDoc = value;
      }

      public String getPrsApePat( )
      {
         return PrsApePat ;
      }

      public void setPrsApePat( String value )
      {
         PrsApePat = value;
      }

      public String getPrsApeMat( )
      {
         return PrsApeMat ;
      }

      public void setPrsApeMat( String value )
      {
         PrsApeMat = value;
      }

      public String getPrsPriNom( )
      {
         return PrsPriNom ;
      }

      public void setPrsPriNom( String value )
      {
         PrsPriNom = value;
      }

      public String getPrsSegNom( )
      {
         return PrsSegNom ;
      }

      public void setPrsSegNom( String value )
      {
         PrsSegNom = value;
      }

      public short getTIPDOCCOD( )
      {
         return TIPDOCCOD ;
      }

      public void setTIPDOCCOD( short value )
      {
         TIPDOCCOD = value;
      }

      public short getTipPrsCod( )
      {
         return TipPrsCod ;
      }

      public void setTipPrsCod( short value )
      {
         TipPrsCod = value;
      }

      public String getPrsEst( )
      {
         return PrsEst ;
      }

      public void setPrsEst( String value )
      {
         PrsEst = value;
      }

      public DateTime getPrsFCR( )
      {
         return PrsFCR ;
      }

      public void setPrsFCR( DateTime value )
      {
         PrsFCR = value;
      }

      public String getPrsHCR( )
      {
         return PrsHCR ;
      }

      public void setPrsHCR( String value )
      {
         PrsHCR = value;
      }

      public String getPrsUCR( )
      {
         return PrsUCR ;
      }

      public void setPrsUCR( String value )
      {
         PrsUCR = value;
      }

      public DateTime getPrsFUM( )
      {
         return PrsFUM ;
      }

      public void setPrsFUM( DateTime value )
      {
         PrsFUM = value;
      }

      public String getPrsHUM( )
      {
         return PrsHUM ;
      }

      public void setPrsHUM( String value )
      {
         PrsHUM = value;
      }

      public String getPrsUUM( )
      {
         return PrsUUM ;
      }

      public void setPrsUUM( String value )
      {
         PrsUUM = value;
      }

      public override void clear( )
      {
         VSel = 0 ;
         PrsCod = "" ;
         TipDocNom = "" ;
         PrsNroDoc = "" ;
         PrsApePat = "" ;
         PrsApeMat = "" ;
         PrsPriNom = "" ;
         PrsSegNom = "" ;
         TIPDOCCOD = 0 ;
         TipPrsCod = 0 ;
         PrsEst = "" ;
         PrsFCR = DateTime.MinValue ;
         PrsHCR = "" ;
         PrsUCR = "" ;
         PrsFUM = DateTime.MinValue ;
         PrsHUM = "" ;
         PrsUUM = "" ;
      }

      public override int compareTo( GXSubfileElement element ,
                                     int column )
      {
         switch (column)
         {
               case 0 :
                  if ( VSel > ((subwmntprsn16) element).getVSel() ) return 1;
                  if ( VSel < ((subwmntprsn16) element).getVSel() ) return -1;
                  return 0;
               case 1 :
                  return GXutil.strcmp( GXutil.upper( PrsCod ), GXutil.upper( ((subwmntprsn16) element).getPrsCod() ));
               case 2 :
                  return GXutil.strcmp( GXutil.upper( TipDocNom ), GXutil.upper( ((subwmntprsn16) element).getTipDocNom() ));
               case 3 :
                  return GXutil.strcmp( GXutil.upper( PrsNroDoc ), GXutil.upper( ((subwmntprsn16) element).getPrsNroDoc() ));
               case 4 :
                  return GXutil.strcmp( GXutil.upper( PrsApePat ), GXutil.upper( ((subwmntprsn16) element).getPrsApePat() ));
               case 5 :
                  return GXutil.strcmp( GXutil.upper( PrsApeMat ), GXutil.upper( ((subwmntprsn16) element).getPrsApeMat() ));
               case 6 :
                  return GXutil.strcmp( GXutil.upper( PrsPriNom ), GXutil.upper( ((subwmntprsn16) element).getPrsPriNom() ));
               case 7 :
                  return GXutil.strcmp( GXutil.upper( PrsSegNom ), GXutil.upper( ((subwmntprsn16) element).getPrsSegNom() ));
               case 8 :
                  if ( TIPDOCCOD > ((subwmntprsn16) element).getTIPDOCCOD() ) return 1;
                  if ( TIPDOCCOD < ((subwmntprsn16) element).getTIPDOCCOD() ) return -1;
                  return 0;
               case 9 :
                  if ( TipPrsCod > ((subwmntprsn16) element).getTipPrsCod() ) return 1;
                  if ( TipPrsCod < ((subwmntprsn16) element).getTipPrsCod() ) return -1;
                  return 0;
               case 10 :
                  return GXutil.strcmp( GXutil.upper( PrsEst ), GXutil.upper( ((subwmntprsn16) element).getPrsEst() ));
               case 11 :
                  return GXutil.datecmp( GxConvert.AnyDateToJDate(PrsFCR) , GxConvert.AnyDateToJDate(((subwmntprsn16) element).getPrsFCR()) );
               case 12 :
                  return GXutil.strcmp( GXutil.upper( PrsHCR ), GXutil.upper( ((subwmntprsn16) element).getPrsHCR() ));
               case 13 :
                  return GXutil.strcmp( GXutil.upper( PrsUCR ), GXutil.upper( ((subwmntprsn16) element).getPrsUCR() ));
               case 14 :
                  return GXutil.datecmp( GxConvert.AnyDateToJDate(PrsFUM) , GxConvert.AnyDateToJDate(((subwmntprsn16) element).getPrsFUM()) );
               case 15 :
                  return GXutil.strcmp( GXutil.upper( PrsHUM ), GXutil.upper( ((subwmntprsn16) element).getPrsHUM() ));
               case 16 :
                  return GXutil.strcmp( GXutil.upper( PrsUUM ), GXutil.upper( ((subwmntprsn16) element).getPrsUUM() ));
         }
         return 0;
      }

      public override bool isEmpty( )
      {
         return ( ( VSel == 0 ) && ( String.Compare(PrsCod.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(TipDocNom.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsNroDoc.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsApePat.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsApeMat.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsPriNom.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsSegNom.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( TIPDOCCOD == 0 ) && ( TipPrsCod == 0 ) && ( String.Compare(PrsEst.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( PrsFCR == DateTime.MinValue ) && ( String.Compare(PrsHCR.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsUCR.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( PrsFUM == DateTime.MinValue ) && ( String.Compare(PrsHUM.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(PrsUUM.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) )  ;
      }

      public override void setColumn( GXComponent cell ,
                                      int field )
      {
         switch (field) {
            case 0 :
               cell.setValue( VSel );
               break;
            case 1 :
               cell.setValue( PrsCod );
               break;
            case 2 :
               cell.setValue( TipDocNom );
               break;
            case 3 :
               cell.setValue( PrsNroDoc );
               break;
            case 4 :
               cell.setValue( PrsApePat );
               break;
            case 5 :
               cell.setValue( PrsApeMat );
               break;
            case 6 :
               cell.setValue( PrsPriNom );
               break;
            case 7 :
               cell.setValue( PrsSegNom );
               break;
            case 8 :
               cell.setValue( TIPDOCCOD );
               break;
            case 9 :
               cell.setValue( TipPrsCod );
               break;
            case 10 :
               cell.setValue( PrsEst );
               break;
            case 11 :
               cell.setValue( GxConvert.AnyDateToJDate(PrsFCR) );
               break;
            case 12 :
               cell.setValue( PrsHCR );
               break;
            case 13 :
               cell.setValue( PrsUCR );
               break;
            case 14 :
               cell.setValue( GxConvert.AnyDateToJDate(PrsFUM) );
               break;
            case 15 :
               cell.setValue( PrsHUM );
               break;
            case 16 :
               cell.setValue( PrsUUM );
               break;
         }
      }

      public bool isFieldChanged( GXComponent cell ,
                                  int field )
      {
         switch (field) {
            case 0 :
               return ( (((GUIObjectShort) cell).getValue() == VSel) );
            case 1 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsCod) == 0) );
            case 2 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),TipDocNom) == 0) );
            case 3 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsNroDoc) == 0) );
            case 4 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsApePat) == 0) );
            case 5 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsApeMat) == 0) );
            case 6 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsPriNom) == 0) );
            case 7 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsSegNom) == 0) );
            case 8 :
               return ( (((GUIObjectShort) cell).getValue() == TIPDOCCOD) );
            case 9 :
               return ( (((GUIObjectShort) cell).getValue() == TipPrsCod) );
            case 10 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsEst) == 0) );
            case 11 :
               return ( (((GUIObjectDatetime) cell).getValue().Equals(GxConvert.AnyDateToJDate(PrsFCR))) );
            case 12 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsHCR) == 0) );
            case 13 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsUCR) == 0) );
            case 14 :
               return ( (((GUIObjectDatetime) cell).getValue().Equals(GxConvert.AnyDateToJDate(PrsFUM))) );
            case 15 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsHUM) == 0) );
            case 16 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsUUM) == 0) );
         }
         return false;
      }

      public override void setField( int i ,
                                     GXComponent value )
      {
         switch (i)
         {
               case 0 :
                  VSel = value.getShortValue() ;
                  break;
               case 1 :
                  PrsCod = value.getStringValue() ;
                  break;
               case 2 :
                  TipDocNom = value.getStringValue() ;
                  break;
               case 3 :
                  PrsNroDoc = value.getStringValue() ;
                  break;
               case 4 :
                  PrsApePat = value.getStringValue() ;
                  break;
               case 5 :
                  PrsApeMat = value.getStringValue() ;
                  break;
               case 6 :
                  PrsPriNom = value.getStringValue() ;
                  break;
               case 7 :
                  PrsSegNom = value.getStringValue() ;
                  break;
               case 8 :
                  TIPDOCCOD = value.getShortValue() ;
                  break;
               case 9 :
                  TipPrsCod = value.getShortValue() ;
                  break;
               case 10 :
                  PrsEst = value.getStringValue() ;
                  break;
               case 11 :
                  PrsFCR = GxConvert.AnyDateToDateTime(value.getDateValue()) ;
                  break;
               case 12 :
                  PrsHCR = value.getStringValue() ;
                  break;
               case 13 :
                  PrsUCR = value.getStringValue() ;
                  break;
               case 14 :
                  PrsFUM = GxConvert.AnyDateToDateTime(value.getDateValue()) ;
                  break;
               case 15 :
                  PrsHUM = value.getStringValue() ;
                  break;
               case 16 :
                  PrsUUM = value.getStringValue() ;
                  break;
         }
      }

      public override void setField( int i ,
                                     GXSubfileElement element )
      {
         switch (i)
         {
               case 0 :
                  VSel = ((subwmntprsn16) element).VSel;
                  return;
               case 1 :
                  PrsCod = ((subwmntprsn16) element).PrsCod;
                  return;
               case 2 :
                  TipDocNom = ((subwmntprsn16) element).TipDocNom;
                  return;
               case 3 :
                  PrsNroDoc = ((subwmntprsn16) element).PrsNroDoc;
                  return;
               case 4 :
                  PrsApePat = ((subwmntprsn16) element).PrsApePat;
                  return;
               case 5 :
                  PrsApeMat = ((subwmntprsn16) element).PrsApeMat;
                  return;
               case 6 :
                  PrsPriNom = ((subwmntprsn16) element).PrsPriNom;
                  return;
               case 7 :
                  PrsSegNom = ((subwmntprsn16) element).PrsSegNom;
                  return;
               case 8 :
                  TIPDOCCOD = ((subwmntprsn16) element).TIPDOCCOD;
                  return;
               case 9 :
                  TipPrsCod = ((subwmntprsn16) element).TipPrsCod;
                  return;
               case 10 :
                  PrsEst = ((subwmntprsn16) element).PrsEst;
                  return;
               case 11 :
                  PrsFCR = ((subwmntprsn16) element).PrsFCR;
                  return;
               case 12 :
                  PrsHCR = ((subwmntprsn16) element).PrsHCR;
                  return;
               case 13 :
                  PrsUCR = ((subwmntprsn16) element).PrsUCR;
                  return;
               case 14 :
                  PrsFUM = ((subwmntprsn16) element).PrsFUM;
                  return;
               case 15 :
                  PrsHUM = ((subwmntprsn16) element).PrsHUM;
                  return;
               case 16 :
                  PrsUUM = ((subwmntprsn16) element).PrsUUM;
                  return;
         }
      }

   }

}
